package team.fivez.defaultmanage.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import team.fivez.defaultmanage.domain.Result;
import team.fivez.defaultmanage.service.IndustryInfoService;
import team.fivez.defaultmanage.utils.Utils;

@CrossOrigin
@RestController
@RequestMapping("/industryInfo")
public class IndustryInfoController {

    private final IndustryInfoService industryInfoService;


    @Autowired
    public IndustryInfoController(IndustryInfoService industryInfoService) {
        this.industryInfoService = industryInfoService;
    }


    @GetMapping("/defaultSituation")
    public Result getDefaultSituation(){
        return Utils.success(industryInfoService.getIndustryDefaultSituation());
    }

    @GetMapping("/redoSituation")
    public Result getRedoSituation(){
        return Utils.success(industryInfoService.getIndustryRedoSituation());
    }

}
